<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>登录JPress</title>

  <meta name=”renderer” content=”webkit”>
  <meta http-equiv=”X-UA-Compatible” content=”IE=Edge,chrome=1″ >
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" >
  
<!-- Bootstrap 3.3.5 -->
<link rel="stylesheet" href="#(CPATH)/static/bootstrap/css/bootstrap.min.css">
<!-- Font Awesome -->
<link rel="stylesheet" href="#(CPATH)/static/font-awesome/css/font-awesome.css">

<!-- Theme style -->
<link rel="stylesheet" href="#(CPATH)/static/lte/css/AdminLTE.min.css">
<link rel="stylesheet" href="#(CPATH)/static/plugins/pace/pace.min.css">

<!--[if lt IE 9]>
 <script src="#(CPATH)/static/plugins/html5/html5shiv.min.js"></script>
 <script src="#(CPATH)/static/plugins/html5/respond.min.js"></script>
<![endif]-->
</head>
<body class="hold-transition login-page">
	<div class="login-box">
		<div class="login-logo">
			<a href="#"><b>JPress</b></a>
		</div>
		<!-- /.login-logo -->
		<div class="login-box-body">
			<p class="login-box-msg">管理员登录</p>

			<form action="#(CPATH)/admin/login" method="post" id="loginform">
				<div class="form-group has-feedback">
					<label>用户名：</label> <input class="form-control" name="username">
					<span class="glyphicon glyphicon-envelope form-control-feedback"></span>
				</div>
				<div class="form-group has-feedback">
					<label>密码：</label> <input type="password" name="password"
						class="form-control"> <span
						class="glyphicon glyphicon-lock form-control-feedback"></span>
				</div>
				<div class="row">
					<div class="col-xs-8">
						<div class="form-group checkbox">
							<label> <input type="checkbox" name="remember_me">
								记住我的登录信息
							</label>
						</div>
					</div>
					<!-- /.col -->
					<div class="col-xs-4">
						<button type="submit" class="btn btn-primary btn-block btn-flat">登录</button>
					</div>
					<!-- /.col -->
				</div>
			</form>

			<!-- /.social-auth-links -->

		</div>
		<!-- /.login-box-body -->
	</div>
	<!-- /.login-box -->

	<!-- jQuery 2.1.4 -->
	<script src="#(CPATH)/static/plugins/jquery/jquery-2.1.4.min.js"></script>
	<script src="#(CPATH)/static/plugins/jquery/jquery.form.min.js"></script>
	<!-- Bootstrap 3.3.5 -->
	<script src="#(CPATH)/static/bootstrap/js/bootstrap.min.js"></script>
	<script src="#(CPATH)static/plugins/pace/pace.min.js"></script>
	<script>
		$(function() {
			$(document).ajaxStart(function() {
				Pace.restart();
			});

			$("#loginform").submit(function() {
				$(this).ajaxSubmit({
					type : "post", 
					dataType : "json", 
					success : function(data) { 
						if(data.errorCode == 0){
							window.location.href="#(CPATH)/admin/index";
						}else{
							alert(data.message);
						}
					},
					error : function() {
						alert("信息提交错误");
					}
				});
				return false; //不刷新页面  
			});
		});
	</script>
</body>
</html>
